using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player_WallJumpState : PlayerStateInAir
{
    public Player_WallJumpState(Player player, StateMachine stateMachine, string animName) : base(player, stateMachine, animName)
    {

    }
    public override void Enter()
    {
        base.Enter();
        player.SetVelocity(player.GetWallJumpForce().x * -player.facingDir, player.GetWallJumpForce().y);
    }
    public override void Update()
    {
        base.Update();
        if (player.IsWall)
        {
            stateMachine.ChangeState(player.wallSildeState);
        }
        if (player.IsGround)
        {
            stateMachine.ChangeState(player.idleState);
        }
    }
    public override void Exit()
    {
        base.Exit();
    }
}
